<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div id="template" class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">小程序续费</div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-u-lg-2 am-form-label">模板类型 </label>
                                <div class="am-u-sm-9 am-u-end">
                                    <input type="text" class="tpl-form-input"
                                           value="{$template['name']} - {$applet['shop_mode']['text']}" disabled>
                                </div>
                            </div>
							<div class="am-form-group">
								<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">续费时间</label>
								<div class="am-u-sm-9 am-u-end">
									<label class="am-radio-inline">
										<input type="radio" name="data[year]" value="1" v-model="year" data-am-ucheck>
										一年
									</label>
									<label class="am-radio-inline">
										<input type="radio" name="data[year]" value="2" v-model="year" data-am-ucheck>
										二年
									</label>
									<label class="am-radio-inline">
										<input type="radio" name="data[year]" value="3" v-model="year" data-am-ucheck>
										三年
									</label>
									<label class="am-radio-inline">
										<input type="radio" name="data[year]" value="4" v-model="year" data-am-ucheck>
										四年
									</label>
									<label class="am-radio-inline">
										<input type="radio" name="data[year]" value="5" v-model="year" data-am-ucheck>
										五年
									</label>
								</div>
							</div>
							<div class="am-form-group">
								<label class="am-u-sm-3 am-u-lg-2 am-form-label">支付费用 </label>
								<div class="am-u-sm-9 am-u-end">
									<span style="font-weight:900;color:#ff0000;" v-if="shop_mode==10">￥{{single[year-1]}}元</span>
									<span style="font-weight:900;color:#ff0000;" v-if="shop_mode==20">￥{{many[year-1]}}元</span>
								</div>
							</div>
							<!-- 表单提交按钮 -->
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary" v-if="shop_mode==10" :disabled="money < single[year-1]">
                                    	{{money < single[year-1] ? '余额不足，请先充值' : '确认续费'}}
                                    </button>
                                    <button type="submit" class="j-submit am-btn am-btn-secondary" v-if="shop_mode==20" :disabled="money < many[year-1]">
										{{money < many[year-1] ? '余额不足，请先充值' : '确认续费'}}
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="/assets/plugins/vue/vue.min.js?v={$version}"></script>
<script>
    $(function () {
		
		// 渲染页面
		new Vue({
			el: '#template',
			data: {
				single: <?= json_encode($template['renew_single'])?>,
				many: <?= json_encode($template['renew_many'])?>,
				shop_mode: <?= $applet['shop_mode']['value']?>,
				year:1,
				money: <?= $money?>
			}
		});
		
        $('#my-form').formPost();

    });
</script>
